import api from '@/api/index.js'
import {refreshTokenPost} from '@/api/refreshToken.js'

const url = '/setting/basic/'
// 查询租户列表
export function BasicListGet(params) {
  refreshTokenPost(api)
  return api({
    url: url + 'typelist/',
    method: 'get',
    params: params,
  })
}

// 新增租户
export function BasicListPost(data) {
  return api({
    url: url + 'typelist/',
    method: 'post',
    data: data,
  })
}


// 查询租户单个
export function BasicPkGet(pk) {
  return api({
    url: url + 'typepk/' + pk + '/',
    method: 'get',
  })
}
// 修改租户
export function BasicPkPut(data,pk) {
  return api({
    url: url + 'typepk/' + pk + '/',
    method: 'put',
    data: data,
  })
}

// 删除租户
export function BasicPkDelete(pk) {
  return api({
    url: url + 'typepk/' + pk + '/',
    method: 'delete',
  })
}